package day05;

public class Extend {
public static void main(String[] args) {
Water a =  new Water();
	//先面向父类创建创建对象
	Food b = new  Water();
	//Water c =(Water) new Food();
	//对象可以访问成员是由编译前对象决定的
	if(b instanceof Water) {
	Water bc =(Water) b;
}
	
}
}
	
